From a8475c2e49132a237761dbea4e8f084d0f1d51e4 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Thu, 17 Aug 2006 16:22:08 +0100 Subject: [PATCH] [HVM] Avoid accessing start_info from xenbus as far as possible, since HVM domains do things slightly differently. Signed-off-by: Steven Smith --- linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c index 3decb3d2bc..2d42be1599 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c @@ -962,7 +962,7 @@ static int xsd_port_read(char *page, char **start, off_t off, static int __init xenbus_probe_init(void) { - int err = 0, dom0; + int err = 0; unsigned long page = 0; DPRINTK(""); @@ -977,9 +977,7 @@ static int __init xenbus_probe_init(void) /* * Domain0 doesn't have a store_evtchn or store_mfn yet. */ - dom0 = (xen_start_info->store_evtchn == 0); - - if (dom0) { + if (is_initial_xendomain()) { struct evtchn_alloc_unbound alloc_unbound; /* Allocate page. */ @@ -1037,7 +1035,7 @@ static int __init xenbus_probe_init(void) device_register(&xenbus_frontend.dev); device_register(&xenbus_backend.dev); - if (!dom0) + if (!is_initial_xendomain()) xenbus_probe(NULL); return 0; -- 2.30.2